<template>
	<fui-button background="#F2F3FF" color="#0052D9" width="148rpx" height="64rpx" @click="upload">
		上传
	</fui-button>
</template>

<script>
	import {
		defineComponent
	} from "vue"
	// import {
	// 	wx_chooseImage
	// } from '../../../utils/wechat'
	import {
		mapActions
	} from 'pinia'
	import {
		useWx
	} from "../../../store/modules/wx"
	export default defineComponent({
		data() {
			return {

			}
		},
		emits: ['change'],
		methods: {
			...mapActions(useWx, ['chooseImage', 'injectSdk']),
			upload() {
				const the = this
				this.injectSdk(() => {

					this.chooseImage((res) => {
						the.$emit('change', res)
					})
				})
			}
		}
	})
</script>

<style>

</style>